package com.lijianan.service;

import com.lijianan.entity.Booking;
import com.lijianan.entity.MeetingRoom;

import java.util.Date;
import java.util.List;

public interface BookingService {
    List<Booking> selectAll();

    Booking selectByBookingId(Integer booking_id);

    List<Booking> selectByRoomId(Integer room_id);

    List<Booking> selectByCustomerId(Integer customer_id);

    List<Booking> selectByStatusForPending();

    List<Booking> selectByStatusForConfirmed();

    List<Booking> selectByCancelPending();

    boolean addBooking(Integer customer_id, Integer room_id, Date use_time_start
            , Date use_time_end, Integer attendee_count, Double price_per_hour, List<String> equipments);

    void checkPaymentTimeout();


    boolean payment(Integer booking_id);

    boolean changeStatusToConfirmed(Integer booking_id);

    boolean changeStatusToCancelled(Integer booking_id);

    boolean changeStatusToExpired(Integer booking_id);

    boolean changeStatusToPending(Integer booking_id);

    boolean changeStatusToCompleted(Integer booking_id);

    boolean changeCancelStatusToApproved(Integer booking_id, Integer user_id);

    boolean changeCancelStatusToRejected(Integer booking_id, Integer user_id);

    boolean judgeRoomCanCancel(Booking booking);

    boolean judgeBookingCanComplete(Booking booking);

    List<Booking> selectByCancelStatusForPending();

    List<Booking> selectByCancelStatusForApprove();

    boolean submitCancelReservation(Integer customer_id, Integer room_id);

    boolean confirmCancelSuccess(Integer booking_id);
}
